﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RescueApp.Model
{
    public class RescueDispatch
    {
        [Key]
        public int? DispatchID { get; set; }

        [Required]
        [ForeignKey("RescueApply")] 
        public int RescueID { get; set; }

        [Required, StringLength(20)]
        public string Driver { get; set; }

        [Required, StringLength(10)]
        public string LicenseID { get; set; }

        [Required]
        public DateTime ArrivedTime { get; set; }

        [Required, StringLength(200)]
        public string Cause { get; set; }

        [Required]
        public float Cost { get; set; }

        public virtual RescueApply RescueApply { get; set; }
    }
}